package com.example.demo.springmvc.principle;

import com.example.demo.springmvc.principle.annotation.Controller;
import com.example.demo.springmvc.principle.annotation.RequestMapping;
import com.example.demo.springmvc.principle.annotation.Scope;

/**
 *  https://blog.csdn.net/qq_34178598/article/details/79200074
 * @author: htc
 * @date: Created in 18:06 2019/2/20.
 */
@Controller
@RequestMapping("/ming")
@Scope("prototype")
public class IndexController extends BaseController {
    private int age = 1;

    @RequestMapping("/index")
    public void index(){
        age ++;
        System.out.println(age);
        System.out.println("index方法执行了"+"username: "+request.getParameter("username"));
    }

    @RequestMapping("/delete")
    public void delete(){
        System.out.println("delete方法执行了");
    }


    @RequestMapping("/search")
    public void search(){
        System.out.println("search方法执行了");
    }


    @RequestMapping("/update")
    public void update(){
        System.out.println("update方法");
    }
}
